import redis

def getNum(redis,key):
	num = redis.lpop(key)
	return num;

r = redis.Redis(host='172.16.40.70', port=6379, db=15)
num = getNum(r,'nums')
print(num ,type(num))